<#include "/includes/son.ftl">

<div class="container-fluid">
    <div class="card">
        <div class="card-header"><h4>修改分类</h4></div>
        <div class="card-body">
            <form action="/goods/shopGoods/goodsEditDo" enctype="multipart/form-data" method="post" id="form1" class="form-horizontal">
                <div class="form-group">
                    <input type="hidden"  id="typeId" name="id" <#if shopGoods??>value="${shopGoods.id}"</#if>>
                </div>
                <div class="form-group">
                    <label for="shopTypeId">分类名称</label>
                    <select class="form-control" name="shopTypeId" id="shopTypeId">
                        <#if shopGoodsType??>
                            <#list shopGoodsType as sgt>
                                <option value="${sgt.id}"  <#if shopGoods??><#if shopGoods.shopTypeId == sgt.id>selected="selected"</#if></#if> >${sgt.typeName}</option>
                            </#list>
                        </#if>
                    </select>
                </div>
                <div class="form-group">
                    <label for="typeName" >商品名称</label>
                    <input class="form-control" type="text" id="typeName" name="shopGoods" placeholder="请输入商品名称.." <#if shopGoods??>value="${shopGoods.shopGoods}"</#if> >
                </div>
                <div class="form-group">
                    <label for="shopGoods">商品数量</label>
                    <input class="form-control" type="text" id="shopGoodsCount" name="shopGoodsCount" placeholder="请输入商品数量.." <#if shopGoods??>value="${shopGoods.shopGoodsCount}"</#if> >
                </div>
                <div class="form-group">
                    <label for="shopGoodsCount">商品价格</label>
                    <input class="form-control" type="text" id="shopGoodsPrice" name="shopGoodsPrice" placeholder="请输入商品价格.." <#if shopGoods??>value="${shopGoods.shopGoodsPrice}"</#if> >
                </div>
                <div class="form-group">
                    <div class="col-xs-2">
                        <label for="shopGoodsImg " >商品图片</label>
                    </div>
                    <div class="col-xs-8">
                        <input class="form-control" type="file" id="shopGoodsImg" name="file" >
                    </div>
                    <div class="col-xs-2">
                        <img style="width: 100px;height: 60px" src="<#if shopGoods??>${shopGoods.shopGoodsImg}</#if> ">
                    </div>
                </div>
                <div class="form-group">
                    <input class="btn btn-primary" id="btn" type="submit"<#if shopGoods??> value="修改" <#else>value="添加"</#if> ></input>
                </div>
            </form>
        </div>
    </div>
</div>
<script>

</script>